Closed
Conversation
Replace 1Password CLI with @cipherstash/protect (protectjs) for encrypting and decrypting CI secrets using ZeroKMS. - Add scripts/ directory with TypeScript encrypt/decrypt tooling - Add encrypted secrets file (.github/secrets.env.encrypted) - Update all workflow files to use protectjs decryption - Add scripts/node_modules/ to .gitignore Requires GitHub secrets: CS_VAULT_CLIENT_KEY, CS_VAULT_CLIENT_ACCESS_KEY
9793ff5 to
4b1f237
Compare
4b1f237 to
f531579
Compare
Replace per-value encryption with single-blob encryption: - Encrypt entire secrets file as one payload - Decrypt once, then parse with dotenv - Simpler, faster, smaller encrypted file
The decrypt step receives bootstrap secrets (CS_CLIENT_ID, etc.) as env vars but they weren't being written to $GITHUB_ENV for subsequent steps. Now forwards all 4 bootstrap secrets alongside decrypted secrets.
auxesis
approved these changes
Dec 22, 2025
Contributor
auxesis
left a comment
There was a problem hiding this comment.
Approved — love to see this experimentation, thanks @tobyhede.
It's basically doing what we used to do way back in the day (2021-2022) on the CI for QX with ejson and ejson2env.
I'm a big fan of the approach you've taken of decrypting the environment variables directly into the GitHub Actions environment. It's a much simpler UX for decrypting in one place, and accessing the secrets throughout the rest of the workflow.
In follow up PRs I think it'd be interesting to explore:
- Separate keys per environment variable, so there's a clearer audit trail about which environment variable has been decrypted, rather than the whole "vault" being accessed.
- This approach refactored into a standalone GitHub Action that we publish on our GitHub for folks to use, and that we also dogfood across our CI.
Contributor
Author
|
@auxesis First version was individual variables, might make that an option. |
Support both whole-file encryption (--file, default) and individual variable encryption (--vars) for CI secrets. - encrypt-secrets.ts: add --file/--vars CLI flags - decrypt-secrets.ts: auto-detect format from encrypted file structure - Backwards compatible: existing file-mode encryption continues to work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created: scripts directory with TypeScript tooling, encrypted secrets file.